package cn.wolfcode.luowowo.scenic.query;

import cn.wolfcode.luowowo.common.query.QueryObject;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;


@Setter
@Getter
public class ScenicCommentQueryObject extends QueryObject {

    public static final Integer ALL = 0;
    public static final Integer HAS_PHOTO = 1; // 有图标签条件
    public static final Integer POSITIVE_COMMENT = 2; // 好评标签条件
    public static final Integer MODERATE_COMMENT = 3; // 中评标签条件
    public static final Integer NEGATIVE_COMMENT = 4; // 差评标签条件
    public static final Integer SPECIFIC_CONTENT_COMMENT = 5; // 差评标签条件

    private Long scenicId = -1L; // 景点
    private String orderBy = "createTime"; // 排序条件
    private Integer tagCondition = ALL;
    // 分页排序
    public Pageable getPageable(){
        PageRequest of = PageRequest.of(super.getCurrentPage() - 1, super.getPageSize());
        return of;
    }
}

